package com.sky.controller.admin;

import com.sky.result.Result;
import com.sky.service.ReadExcelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

@RestController
@RequestMapping("/admin/readExcel")
public class ReadExcelController {
    @Autowired
    private ReadExcelService readExcelService;

    @PostMapping
    public Result readExcel(MultipartFile file) throws IOException {
        return readExcelService.readExcel(file);

    }
}
